package com.haixiaoke.saas.workOrder.state.role;

import com.haixiaoke.saas.common.exception.ServiceException;
import com.haixiaoke.saas.common.utils.spring.SpringUtils;
import com.haixiaoke.saas.house.service.IHousePictureService;
import com.haixiaoke.saas.house.service.IHouseService;
import com.haixiaoke.saas.house.service.impl.HousePictureServiceImpl;
import com.haixiaoke.saas.house.service.impl.HouseServiceImpl;
import com.haixiaoke.saas.lock.service.impl.HouseLockServiceImpl;
import com.haixiaoke.saas.maintenance.service.IMaintenanceItemService;
import com.haixiaoke.saas.maintenance.service.impl.MaintenanceItemServiceImpl;
import com.haixiaoke.saas.setSwitch.service.ISetSwitchService;
import com.haixiaoke.saas.setSwitch.service.impl.SetSwitchServiceImpl;
import com.haixiaoke.saas.user.service.IUserConsumerService;
import com.haixiaoke.saas.user.service.impl.UserConsumerServiceImpl;
import com.haixiaoke.saas.workOrder.domain.WorkOrder;
import com.haixiaoke.saas.workOrder.domain.WorkOrderPerson;
import com.haixiaoke.saas.workOrder.domain.WorkOrderRecord;
import com.haixiaoke.saas.workOrder.service.IWorkOrderChargeItemService;
import com.haixiaoke.saas.workOrder.service.IWorkOrderPersonService;
import com.haixiaoke.saas.workOrder.service.IWorkOrderRecordService;
import com.haixiaoke.saas.workOrder.service.IWorkOrderService;
import com.haixiaoke.saas.workOrder.service.impl.*;
import com.haixiaoke.saas.workOrder.state.server.ISpecificWorkOrderTypeServerRole;
import com.haixiaoke.saas.workOrder.state.server.IWorkOrderTypeServerRole;

/**
 * @Author panda
 * @Date 2024/9/3
 **/
public abstract class AbstractSpecificWorkOrderTypeServerRole implements ISpecificWorkOrderTypeServerRole {

    public IWorkOrderService workOrderService = SpringUtils.getBean(WorkOrderServiceImpl.class);
    public IWorkOrderRecordService workOrderRecordService = SpringUtils.getBean(WorkOrderRecordServiceImpl.class);
    public IWorkOrderChargeItemService workOrderChargeItemService = SpringUtils.getBean(WorkOrderChargeItemServiceImpl.class);
    public IUserConsumerService userConsumerService = SpringUtils.getBean(UserConsumerServiceImpl.class);
    public IHouseService houseService = SpringUtils.getBean(HouseServiceImpl.class);
    public ISetSwitchService setSwitchService = SpringUtils.getBean(SetSwitchServiceImpl.class);
    public IWorkOrderPersonService workOrderPersonService = SpringUtils.getBean(WorkOrderPersonServiceImpl.class);
    public IMaintenanceItemService maintenanceItemService = SpringUtils.getBean(MaintenanceItemServiceImpl.class);

    public HouseLockServiceImpl houseLockService = SpringUtils.getBean(HouseLockServiceImpl.class);

    public IHousePictureService housePictureService = SpringUtils.getBean(HousePictureServiceImpl.class);
    public WorkOrderPwdRecordServiceImpl workOrderPwdRecordService = SpringUtils.getBean(WorkOrderPwdRecordServiceImpl.class);
    protected IWorkOrderTypeServerRole typeServerRole;

    public AbstractSpecificWorkOrderTypeServerRole(IWorkOrderTypeServerRole typeServerRole) {
        this.typeServerRole = typeServerRole;
    }

    @Override
    public int insertWorkOrder(WorkOrder workOrder, String phone) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int rejectWorkOrder(WorkOrder workOrder, WorkOrderRecord workOrderRecord, String userName, String flatUserName) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int dispatchWorkOrder(WorkOrder workOrder, WorkOrderPerson workOrderPerson) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int receivedWorkOrder(WorkOrder workOrder, WorkOrderRecord workOrderRecord, Long busUserId, String personTenantId) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int requestRejectionWorkOrder(WorkOrder workOrder, WorkOrderRecord workOrderRecord, Long busUserId, String personTenantId) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int auditDenialWorkOrder(WorkOrder workOrder, WorkOrderRecord workOrderRecord, String username) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int beingRepaired(WorkOrder workOrder) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int submitPaymentSlip(WorkOrder workOrder) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int revocationRejectionWorkOrder(WorkOrder workOrder, WorkOrderRecord workOrderRecord, Long busUserId, String personTenantId) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public void applyTemporaryPassword(WorkOrder workOrder, String name, String phone, Long busUserId) {
        throw new ServiceException("工单类型异常,无法申请临时密码");
    }

    @Override
    public int updateWorkOrder(WorkOrder workOrder, String phone) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int confirmLookHouse(WorkOrder workOrder, Long busUserId, String personTenantId) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }

    @Override
    public int paymentCompletion(WorkOrder workOrder, WorkOrderRecord record) {
        throw new ServiceException("工单类型异常, 无法获取对应的实现类");
    }


}
